#pragma once
#include "gtest/gtest.h"
#include "../ElementTools.hpp"

using namespace SG::Algebra;

class computePlaneCoordTransTest : public ::testing::Test
{
public:
    virtual void SetUp() override
    {
        points.resize(3);
        points[0].m_x=1.0;points[0].m_y=1.0;points[0].m_z=0.0;
        points[1].m_x=2.0;points[1].m_y=2.0;points[1].m_z=0.0;
        points[2].m_x=1.0;points[2].m_y=0.0;points[2].m_z=0.0;

    } 
protected:
    std::vector<Point> points;
    
};

TEST_F(computePlaneCoordTransTest , computePlaneCoordTrans)
{
    Matrix T,localCoord;
    Point origin;
    ElementTools::computePlaneCoordTrans (points, T, origin, localCoord);
    Matrix localCoordTarget(3, 2, {0.0, 0.0,
                                    1.4142135623, 0.0,
                                    -0.707106, 0.707106781,

     });
    ASSERT_TRUE(localCoord == localCoordTarget);
}
